---@class DSActorItem : UIComponentInterface
DSActorItem = Class("DSActorItem",UIComponentInterface)
---@param parentView UIDarkStreetPlayerLayer
function DSActorItem:ctor(actorId,actorType,parentView)
    self.actorType = actorType
    rawset(self,"parentView",parentView)
    self.actorId = actorId
    self.anchor = Vector2.New(0.5,1)
end
function DSActorItem:OnCreate(obj)
    ---@type GComponent
    self.fguiObj = obj
end
function DSActorItem:OnDestroy()
    if self.fguiObj then
        self.fguiObj:Dispose()
        self.fguiObj = nil
        self.parentView = nil
        self:DelReferenceAll()
    end
end
function DSActorItem:SetFollowPos(x,y)
    self.isFollowPos = true
    self.followX = x
    self.followY = y
end
function DSActorItem:CanDestroy()
    return true
end
function DSActorItem:IsFollowPos()
    return self.isFollowPos
end
function DSActorItem:SetVisible(visible)
    if self.visible ~= visible then
        self.fguiObj.visible = visible
        self.visible = visible
    end
end
---@param actor RedRob.Pawn
function DSActorItem:Refresh(actor)

end
function DSActorItem:SetHp(hp,max)

end
function DSActorItem:SetPos(x,y)
    self.fguiObj:SetXY(x - self.fguiObj.width*self.anchor.x,y-self.fguiObj.height*self.anchor.y)
end
return DSActorItem